package net.sk.china.city.talk.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import net.sk.china.city.talk.model.Article;
import net.sk.china.city.talk.request.ArticleRequest;
import net.sk.china.city.talk.request.ArticleSearchRequest;
import net.sk.china.city.talk.response.ArticleResponse;
import net.sk.china.common.request.PageParamRequest;

/**
 * ArticleService 接口
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/2/21 9:47
 * // +----------------------------------------------------------------------
 */
public interface ArticleService extends IService<Article> {

    /**
     * 获取文章列表
     * @param request 请求参数
     * @param pageParamRequest 分页参数
     * @return {@code PageInfo<ArticleResponse>}
     */
    PageInfo<ArticleResponse> getAdminList(ArticleSearchRequest request, PageParamRequest pageParamRequest);

    /**
     * 文章新增
     * @param request 文章新增参数
     * @return {@code boolean}
     */
    boolean create(ArticleRequest request);

    /**
     * 文章删除
     * @param id 文章id
     * @return {@code boolean}
     */
    boolean deleteById(Integer id);

    /**
     * 文章修改
     * @param id 文章id
     * @param request 文章修改参数
     * @return {@code boolean}
     */
    boolean updateArticle(Integer id, ArticleRequest request);

    /**
     * 获取文章详情
     * @param id 文章id
     * @return {@code Article}
     */
    Article getDetail(Integer id);
}
